"use client"
import { Button, } from "antd";
const ButtonView: React.FC<reactDndProps> = ({ data }) => {

    const handleClickButton = (e: { stopPropagation: () => void; }) => {
        e.stopPropagation();
        if(!data.onChange) return;
        const dynamicFunc = new Function(data.onChange);
        dynamicFunc(); // 执行代码
    }
    return (<div><Button onClick={handleClickButton}>{data.name}</Button></div>)
}
export default ButtonView;